Start off by putting the @NamedQuery annotation on your entity class
Then add a corresponding entry to your NamedQueries class along with a comment. You'll notice that the value of the constant is the named attribute we provided to the @NamedQuery annotation above.
The end result of these is that named queries 1) will never be mistyped, and 2) provide handy context help to remind you which parameters need to be added: